import requests


symbol = "BTCUSDT"
period = "5m"
limit = 10
contractType="PERPETUAL"
url = f"https://fapi.binance.com/futures/data/basis?pair={symbol}&period={period}&contractType={contractType}&limit={limit}"
response = requests.get(url)
data = response.json()
print(data)